<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Haru PDF</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gnupg-verify.html">gnupg_verify</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.haru.html">简介</a></div>
 <div class="up"><a href="refs.utilspec.nontext.html">非文本内容的 MIME 输出</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="book.haru" class="book">
 <h1 class="title">Haru PDF</h1>
 
 
 
 
 
 
 







 







 







 

 




 




 





 






 





 





 





 





 




 





 
<ul class="chunklist chunklist_book"><li><a href="intro.haru.html">简介</a></li><li><a href="haru.setup.html">安装／配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="haru.requirements.html">需求</a></li><li><a href="haru.installation.html">安装</a></li><li><a href="haru.configuration.html">运行时配置</a></li><li><a href="haru.resources.html">资源类型</a></li></ul></li><li><a href="haru.constants.html">预定义常量</a></li><li><a href="haru.examples.html">范例</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="haru.examples-basics.html">Basic PECL/haru example</a></li></ul></li><li><a href="haru.builtin.html">Builtin Fonts And Encodings</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="haru.builtin.fonts.html">Builtin Fonts</a></li><li><a href="haru.builtin.encodings.html">Builtin Encodings</a></li></ul></li><li><a href="class.haruexception.html">HaruException</a> — The HaruException class</li><li><a href="class.harudoc.html">HaruDoc</a> — The HaruDoc class<ul class="chunklist chunklist_book chunklist_children"><li><a href="harudoc.addpage.html">HaruDoc::addPage</a> — Add new page to the document</li><li><a href="harudoc.addpagelabel.html">HaruDoc::addPageLabel</a> — Set the numbering style for the specified range of pages</li><li><a href="harudoc.construct.html">HaruDoc::__construct</a> — Construct new HaruDoc instance</li><li><a href="harudoc.createoutline.html">HaruDoc::createOutline</a> — Create a HaruOutline instance</li><li><a href="harudoc.getcurrentencoder.html">HaruDoc::getCurrentEncoder</a> — Get HaruEncoder currently used in the document</li><li><a href="harudoc.getcurrentpage.html">HaruDoc::getCurrentPage</a> — Return current page of the document</li><li><a href="harudoc.getencoder.html">HaruDoc::getEncoder</a> — Get HaruEncoder instance for the specified encoding</li><li><a href="harudoc.getfont.html">HaruDoc::getFont</a> — Get HaruFont instance</li><li><a href="harudoc.getinfoattr.html">HaruDoc::getInfoAttr</a> — Get current value of the specified document attribute</li><li><a href="harudoc.getpagelayout.html">HaruDoc::getPageLayout</a> — Get current page layout</li><li><a href="harudoc.getpagemode.html">HaruDoc::getPageMode</a> — Get current page mode</li><li><a href="harudoc.getstreamsize.html">HaruDoc::getStreamSize</a> — Get the size of the temporary stream</li><li><a href="harudoc.insertpage.html">HaruDoc::insertPage</a> — Insert new page just before the specified page</li><li><a href="harudoc.loadjpeg.html">HaruDoc::loadJPEG</a> — Load a JPEG image</li><li><a href="harudoc.loadpng.html">HaruDoc::loadPNG</a> — Load PNG image and return HaruImage instance</li><li><a href="harudoc.loadraw.html">HaruDoc::loadRaw</a> — Load a RAW image</li><li><a href="harudoc.loadttc.html">HaruDoc::loadTTC</a> — Load the font with the specified index from TTC file</li><li><a href="harudoc.loadttf.html">HaruDoc::loadTTF</a> — Load TTF font file</li><li><a href="harudoc.loadtype1.html">HaruDoc::loadType1</a> — Load Type1 font</li><li><a href="harudoc.output.html">HaruDoc::output</a> — Write the document data to the output buffer</li><li><a href="harudoc.readfromstream.html">HaruDoc::readFromStream</a> — Read data from the temporary stream</li><li><a href="harudoc.reseterror.html">HaruDoc::resetError</a> — Reset error state of the document handle</li><li><a href="harudoc.resetstream.html">HaruDoc::resetStream</a> — Rewind the temporary stream</li><li><a href="harudoc.save.html">HaruDoc::save</a> — Save the document into the specified file</li><li><a href="harudoc.savetostream.html">HaruDoc::saveToStream</a> — Save the document into a temporary stream</li><li><a href="harudoc.setcompressionmode.html">HaruDoc::setCompressionMode</a> — Set compression mode for the document</li><li><a href="harudoc.setcurrentencoder.html">HaruDoc::setCurrentEncoder</a> — Set the current encoder for the document</li><li><a href="harudoc.setencryptionmode.html">HaruDoc::setEncryptionMode</a> — Set encryption mode for the document</li><li><a href="harudoc.setinfoattr.html">HaruDoc::setInfoAttr</a> — Set the info attribute of the document</li><li><a href="harudoc.setinfodateattr.html">HaruDoc::setInfoDateAttr</a> — Set the datetime info attributes of the document</li><li><a href="harudoc.setopenaction.html">HaruDoc::setOpenAction</a> — Define which page is shown when the document is opened</li><li><a href="harudoc.setpagelayout.html">HaruDoc::setPageLayout</a> — Set how pages should be displayed</li><li><a href="harudoc.setpagemode.html">HaruDoc::setPageMode</a> — Set how the document should be displayed</li><li><a href="harudoc.setpagesconfiguration.html">HaruDoc::setPagesConfiguration</a> — Set the number of pages per set of pages</li><li><a href="harudoc.setpassword.html">HaruDoc::setPassword</a> — Set owner and user passwords for the document</li><li><a href="harudoc.setpermission.html">HaruDoc::setPermission</a> — Set permissions for the document</li><li><a href="harudoc.usecnsencodings.html">HaruDoc::useCNSEncodings</a> — Enable Chinese simplified encodings</li><li><a href="harudoc.usecnsfonts.html">HaruDoc::useCNSFonts</a> — Enable builtin Chinese simplified fonts</li><li><a href="harudoc.usecntencodings.html">HaruDoc::useCNTEncodings</a> — Enable Chinese traditional encodings</li><li><a href="harudoc.usecntfonts.html">HaruDoc::useCNTFonts</a> — Enable builtin Chinese traditional fonts</li><li><a href="harudoc.usejpencodings.html">HaruDoc::useJPEncodings</a> — Enable Japanese encodings</li><li><a href="harudoc.usejpfonts.html">HaruDoc::useJPFonts</a> — Enable builtin Japanese fonts</li><li><a href="harudoc.usekrencodings.html">HaruDoc::useKREncodings</a> — Enable Korean encodings</li><li><a href="harudoc.usekrfonts.html">HaruDoc::useKRFonts</a> — Enable builtin Korean fonts</li></ul></li><li><a href="class.harupage.html">HaruPage</a> — The HaruPage class<ul class="chunklist chunklist_book chunklist_children"><li><a href="harupage.arc.html">HaruPage::arc</a> — Append an arc to the current path</li><li><a href="harupage.begintext.html">HaruPage::beginText</a> — Begin a text object and set the current text position to (0,0)</li><li><a href="harupage.circle.html">HaruPage::circle</a> — Append a circle to the current path</li><li><a href="harupage.closepath.html">HaruPage::closePath</a> — Append a straight line from the current point to the start point of the path</li><li><a href="harupage.concat.html">HaruPage::concat</a> — Concatenate current transformation matrix of the page and the specified matrix</li><li><a href="harupage.createdestination.html">HaruPage::createDestination</a> — Create new HaruDestination instance</li><li><a href="harupage.createlinkannotation.html">HaruPage::createLinkAnnotation</a> — Create new HaruAnnotation instance</li><li><a href="harupage.createtextannotation.html">HaruPage::createTextAnnotation</a> — Create new HaruAnnotation instance</li><li><a href="harupage.createurlannotation.html">HaruPage::createURLAnnotation</a> — Create and return new HaruAnnotation instance</li><li><a href="harupage.curveto2.html">HaruPage::curveTo2</a> — Append a Bezier curve to the current path</li><li><a href="harupage.curveto3.html">HaruPage::curveTo3</a> — Append a Bezier curve to the current path</li><li><a href="harupage.curveto.html">HaruPage::curveTo</a> — Append a Bezier curve to the current path</li><li><a href="harupage.drawimage.html">HaruPage::drawImage</a> — Show image at the page</li><li><a href="harupage.ellipse.html">HaruPage::ellipse</a> — Append an ellipse to the current path</li><li><a href="harupage.endpath.html">HaruPage::endPath</a> — End current path object without filling and painting operations</li><li><a href="harupage.endtext.html">HaruPage::endText</a> — End current text object</li><li><a href="harupage.eofill.html">HaruPage::eofill</a> — Fill current path using even-odd rule</li><li><a href="harupage.eofillstroke.html">HaruPage::eoFillStroke</a> — Fill current path using even-odd rule, then paint the path</li><li><a href="harupage.fill.html">HaruPage::fill</a> — Fill current path using nonzero winding number rule</li><li><a href="harupage.fillstroke.html">HaruPage::fillStroke</a> — Fill current path using nonzero winding number rule, then paint the path</li><li><a href="harupage.getcharspace.html">HaruPage::getCharSpace</a> — Get the current value of character spacing</li><li><a href="harupage.getcmykfill.html">HaruPage::getCMYKFill</a> — Get the current filling color</li><li><a href="harupage.getcmykstroke.html">HaruPage::getCMYKStroke</a> — Get the current stroking color</li><li><a href="harupage.getcurrentfont.html">HaruPage::getCurrentFont</a> — Get the currently used font</li><li><a href="harupage.getcurrentfontsize.html">HaruPage::getCurrentFontSize</a> — Get the current font size</li><li><a href="harupage.getcurrentpos.html">HaruPage::getCurrentPos</a> — Get the current position for path painting</li><li><a href="harupage.getcurrenttextpos.html">HaruPage::getCurrentTextPos</a> — Get the current position for text printing</li><li><a href="harupage.getdash.html">HaruPage::getDash</a> — Get the current dash pattern</li><li><a href="harupage.getfillingcolorspace.html">HaruPage::getFillingColorSpace</a> — Get the current filling color space</li><li><a href="harupage.getflatness.html">HaruPage::getFlatness</a> — Get the flatness of the page</li><li><a href="harupage.getgmode.html">HaruPage::getGMode</a> — Get the current graphics mode</li><li><a href="harupage.getgrayfill.html">HaruPage::getGrayFill</a> — Get the current filling color</li><li><a href="harupage.getgraystroke.html">HaruPage::getGrayStroke</a> — Get the current stroking color</li><li><a href="harupage.getheight.html">HaruPage::getHeight</a> — Get the height of the page</li><li><a href="harupage.gethorizontalscaling.html">HaruPage::getHorizontalScaling</a> — Get the current value of horizontal scaling</li><li><a href="harupage.getlinecap.html">HaruPage::getLineCap</a> — Get the current line cap style</li><li><a href="harupage.getlinejoin.html">HaruPage::getLineJoin</a> — Get the current line join style</li><li><a href="harupage.getlinewidth.html">HaruPage::getLineWidth</a> — Get the current line width</li><li><a href="harupage.getmiterlimit.html">HaruPage::getMiterLimit</a> — Get the value of miter limit</li><li><a href="harupage.getrgbfill.html">HaruPage::getRGBFill</a> — Get the current filling color</li><li><a href="harupage.getrgbstroke.html">HaruPage::getRGBStroke</a> — Get the current stroking color</li><li><a href="harupage.getstrokingcolorspace.html">HaruPage::getStrokingColorSpace</a> — Get the current stroking color space</li><li><a href="harupage.gettextleading.html">HaruPage::getTextLeading</a> — Get the current value of line spacing</li><li><a href="harupage.gettextmatrix.html">HaruPage::getTextMatrix</a> — Get the current text transformation matrix of the page</li><li><a href="harupage.gettextrenderingmode.html">HaruPage::getTextRenderingMode</a> — Get the current text rendering mode</li><li><a href="harupage.gettextrise.html">HaruPage::getTextRise</a> — Get the current value of text rising</li><li><a href="harupage.gettextwidth.html">HaruPage::getTextWidth</a> — Get the width of the text using current fontsize, character spacing and word spacing</li><li><a href="harupage.gettransmatrix.html">HaruPage::getTransMatrix</a> — Get the current transformation matrix of the page</li><li><a href="harupage.getwidth.html">HaruPage::getWidth</a> — Get the width of the page</li><li><a href="harupage.getwordspace.html">HaruPage::getWordSpace</a> — Get the current value of word spacing</li><li><a href="harupage.lineto.html">HaruPage::lineTo</a> — Draw a line from the current point to the specified point</li><li><a href="harupage.measuretext.html">HaruPage::measureText</a> — Calculate the number of characters which can be included within the specified width</li><li><a href="harupage.movetextpos.html">HaruPage::moveTextPos</a> — Move text position to the specified offset</li><li><a href="harupage.moveto.html">HaruPage::moveTo</a> — Set starting point for new drawing path</li><li><a href="harupage.movetonextline.html">HaruPage::moveToNextLine</a> — Move text position to the start of the next line</li><li><a href="harupage.rectangle.html">HaruPage::rectangle</a> — Append a rectangle to the current path</li><li><a href="harupage.setcharspace.html">HaruPage::setCharSpace</a> — Set character spacing for the page</li><li><a href="harupage.setcmykfill.html">HaruPage::setCMYKFill</a> — Set filling color for the page</li><li><a href="harupage.setcmykstroke.html">HaruPage::setCMYKStroke</a> — Set stroking color for the page</li><li><a href="harupage.setdash.html">HaruPage::setDash</a> — Set the dash pattern for the page</li><li><a href="harupage.setflatness.html">HaruPage::setFlatness</a> — Set flatness for the page</li><li><a href="harupage.setfontandsize.html">HaruPage::setFontAndSize</a> — Set font and fontsize for the page</li><li><a href="harupage.setgrayfill.html">HaruPage::setGrayFill</a> — Set filling color for the page</li><li><a href="harupage.setgraystroke.html">HaruPage::setGrayStroke</a> — Sets stroking color for the page</li><li><a href="harupage.setheight.html">HaruPage::setHeight</a> — Set height of the page</li><li><a href="harupage.sethorizontalscaling.html">HaruPage::setHorizontalScaling</a> — Set horizontal scaling for the page</li><li><a href="harupage.setlinecap.html">HaruPage::setLineCap</a> — Set the shape to be used at the ends of lines</li><li><a href="harupage.setlinejoin.html">HaruPage::setLineJoin</a> — Set line join style for the page</li><li><a href="harupage.setlinewidth.html">HaruPage::setLineWidth</a> — Set line width for the page</li><li><a href="harupage.setmiterlimit.html">HaruPage::setMiterLimit</a> — Set the current value of the miter limit of the page</li><li><a href="harupage.setrgbfill.html">HaruPage::setRGBFill</a> — Set filling color for the page</li><li><a href="harupage.setrgbstroke.html">HaruPage::setRGBStroke</a> — Set stroking color for the page</li><li><a href="harupage.setrotate.html">HaruPage::setRotate</a> — Set rotation angle of the page</li><li><a href="harupage.setsize.html">HaruPage::setSize</a> — Set size and direction of the page</li><li><a href="harupage.setslideshow.html">HaruPage::setSlideShow</a> — Set transition style for the page</li><li><a href="harupage.settextleading.html">HaruPage::setTextLeading</a> — Set text leading (line spacing) for the page</li><li><a href="harupage.settextmatrix.html">HaruPage::setTextMatrix</a> — Set the current text transformation matrix of the page</li><li><a href="harupage.settextrenderingmode.html">HaruPage::setTextRenderingMode</a> — Set text rendering mode for the page</li><li><a href="harupage.settextrise.html">HaruPage::setTextRise</a> — Set the current value of text rising</li><li><a href="harupage.setwidth.html">HaruPage::setWidth</a> — Set width of the page</li><li><a href="harupage.setwordspace.html">HaruPage::setWordSpace</a> — Set word spacing for the page</li><li><a href="harupage.showtext.html">HaruPage::showText</a> — Print text at the current position of the page</li><li><a href="harupage.showtextnextline.html">HaruPage::showTextNextLine</a> — Move the current position to the start of the next line and print the text</li><li><a href="harupage.stroke.html">HaruPage::stroke</a> — Paint current path</li><li><a href="harupage.textout.html">HaruPage::textOut</a> — Print the text on the specified position</li><li><a href="harupage.textrect.html">HaruPage::textRect</a> — Print the text inside the specified region</li></ul></li><li><a href="class.harufont.html">HaruFont</a> — The HaruFont class<ul class="chunklist chunklist_book chunklist_children"><li><a href="harufont.getascent.html">HaruFont::getAscent</a> — Get the vertical ascent of the font</li><li><a href="harufont.getcapheight.html">HaruFont::getCapHeight</a> — Get the distance from the baseline of uppercase letters</li><li><a href="harufont.getdescent.html">HaruFont::getDescent</a> — Get the vertical descent of the font</li><li><a href="harufont.getencodingname.html">HaruFont::getEncodingName</a> — Get the name of the encoding</li><li><a href="harufont.getfontname.html">HaruFont::getFontName</a> — Get the name of the font</li><li><a href="harufont.gettextwidth.html">HaruFont::getTextWidth</a> — Get the total width of the text, number of characters, number of words and number of spaces</li><li><a href="harufont.getunicodewidth.html">HaruFont::getUnicodeWidth</a> — Get the width of the character in the font</li><li><a href="harufont.getxheight.html">HaruFont::getXHeight</a> — Get the distance from the baseline of lowercase letters</li><li><a href="harufont.measuretext.html">HaruFont::measureText</a> — Calculate the number of characters which can be included within the specified width</li></ul></li><li><a href="class.haruimage.html">HaruImage</a> — The HaruImage class<ul class="chunklist chunklist_book chunklist_children"><li><a href="haruimage.getbitspercomponent.html">HaruImage::getBitsPerComponent</a> — Get the number of bits used to describe each color component of the image</li><li><a href="haruimage.getcolorspace.html">HaruImage::getColorSpace</a> — Get the name of the color space</li><li><a href="haruimage.getheight.html">HaruImage::getHeight</a> — Get the height of the image</li><li><a href="haruimage.getsize.html">HaruImage::getSize</a> — Get size of the image</li><li><a href="haruimage.getwidth.html">HaruImage::getWidth</a> — Get the width of the image</li><li><a href="haruimage.setcolormask.html">HaruImage::setColorMask</a> — Set the color mask of the image</li><li><a href="haruimage.setmaskimage.html">HaruImage::setMaskImage</a> — Set the image mask</li></ul></li><li><a href="class.haruencoder.html">HaruEncoder</a> — The HaruEncoder class<ul class="chunklist chunklist_book chunklist_children"><li><a href="haruencoder.getbytetype.html">HaruEncoder::getByteType</a> — Get the type of the byte in the text</li><li><a href="haruencoder.gettype.html">HaruEncoder::getType</a> — Get the type of the encoder</li><li><a href="haruencoder.getunicode.html">HaruEncoder::getUnicode</a> — Convert the specified character to unicode</li><li><a href="haruencoder.getwritingmode.html">HaruEncoder::getWritingMode</a> — Get the writing mode of the encoder</li></ul></li><li><a href="class.haruoutline.html">HaruOutline</a> — The HaruOutline class<ul class="chunklist chunklist_book chunklist_children"><li><a href="haruoutline.setdestination.html">HaruOutline::setDestination</a> — Set the destination for the outline</li><li><a href="haruoutline.setopened.html">HaruOutline::setOpened</a> — Set the initial state of the outline</li></ul></li><li><a href="class.haruannotation.html">HaruAnnotation</a> — The HaruAnnotation class<ul class="chunklist chunklist_book chunklist_children"><li><a href="haruannotation.setborderstyle.html">HaruAnnotation::setBorderStyle</a> — Set the border style of the annotation</li><li><a href="haruannotation.sethighlightmode.html">HaruAnnotation::setHighlightMode</a> — Set the highlighting mode of the annotation</li><li><a href="haruannotation.seticon.html">HaruAnnotation::setIcon</a> — Set the icon style of the annotation</li><li><a href="haruannotation.setopened.html">HaruAnnotation::setOpened</a> — Set the initial state of the annotation</li></ul></li><li><a href="class.harudestination.html">HaruDestination</a> — The HaruDestination class<ul class="chunklist chunklist_book chunklist_children"><li><a href="harudestination.setfit.html">HaruDestination::setFit</a> — Set the appearance of the page to fit the window</li><li><a href="harudestination.setfitb.html">HaruDestination::setFitB</a> — Set the appearance of the page to fit the bounding box of the page within the window</li><li><a href="harudestination.setfitbh.html">HaruDestination::setFitBH</a> — Set the appearance of the page to fit the width of the bounding box</li><li><a href="harudestination.setfitbv.html">HaruDestination::setFitBV</a> — Set the appearance of the page to fit the height of the boudning box</li><li><a href="harudestination.setfith.html">HaruDestination::setFitH</a> — Set the appearance of the page to fit the window width</li><li><a href="harudestination.setfitr.html">HaruDestination::setFitR</a> — Set the appearance of the page to fit the specified rectangle</li><li><a href="harudestination.setfitv.html">HaruDestination::setFitV</a> — Set the appearance of the page to fit the window height</li><li><a href="harudestination.setxyz.html">HaruDestination::setXYZ</a> — Set the appearance of the page</li></ul></li></ul></div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gnupg-verify.html">gnupg_verify</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.haru.html">简介</a></div>
 <div class="up"><a href="refs.utilspec.nontext.html">非文本内容的 MIME 输出</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
